import base from './base'; // 导入接口域名列表
import axios from '@/axios/http.js'; // 导入http中创建的axios实例
// import qs from 'qs'; 

const init = {
    login(name,pwd) {
        return axios.get(`${base.api}login?username=${name}&password=${pwd}`);
    },
    // 用户登录
    getplanlist(val,keywords){
        return axios.get(`${base.api}getplanlist?logincode=${val}&keyword=${keywords}`);
    },
    getpublicplanlist(val,keywords){
        return axios.get(`${base.api}getpublicorderlist?logincode=${val}&keyword=${keywords}`);
    },
    getorderlist(val,keywords){
        return axios.get(`${base.api}getorderlist?logincode=${val}&keyword=${keywords}`);
    },
    gettemplatedetail(val,id){
        return axios.get(`${base.api}gettemplatedetail?logincode=${val}&tempid=${id}`);
    },
    getorderdetail(val,id){
        return axios.get(`${base.api}getorderdetail?logincode=${val}&id=${id}`);
    },
    saverequest(val,data){
        return axios.post(`${base.api}saverequest?logincode=${val}`,data);
    },
    delOrder(val,id){
        return axios.post(`${base.api}delorder?logincode=${val}&id=${id}`);
    }
}

export default init;

